{template 'common/header'}
{if $op == 'display'}
<div class="pull-right">
    <a href="{php echo $this->createWeburl('jianzhi_info', array('op'=>'posts'))}"  class="btn btn-primary we7-padding-horizontal" style="margin-bottom: 20px">添加兼职信息</a>
</div>
<form class="form-horizontal" action="" method="post">
    <table class="table we7-table table-hover article-list vertical-middle">
        <tr>
            <td style="width:100px">排序</td>
            <td>发布者</td>
            <td>兼职名称</td>
            <td>兼职类型</td>
            <td>是否置顶</td>
            <td>置顶到期时间</td>
            <td>审核状态</td>
            <td class="text-right">操作</td>
        </tr>
        {loop $products $item}
        <tr>
            <td>
                {$item['f_id']}
            </td>
            <td>
                {if $item['f_openid'] !='' }
                   {$item['s_name']}
                {else}
                    {$item['f_gongsi']}
                {/if}
            </td>           
            <td>
                {$item['f_name']}
            </td>
            <td>
                {$item['f_leixing']}
            </td>
            <td>
                {if $item['f_zhiding']=="是"}
                    <p style="color: green">{$item['f_zhiding']}</p>
                    <a class="btn btn-default btn-sm" style="color: red" href="{php echo $this->createWeburl('jianzhi_info', array('f_id' => $item['f_id'], 'op' =>'saves'))}" >取消置顶</a>
                {else}
                    <p style="color: red">{$item['f_zhiding']}</p>
                    <a class="btn btn-default btn-sm" style="color: green" href="{php echo $this->createWeburl('jianzhi_info', array('f_id' => $item['f_id'], 'op' =>'saves'))}" >置顶</a> 
                {/if}
            </td>
            <td>
                {if $item['f_zhiding_endtime']=='1970-01-01 08:00:00' || $item['f_zhiding_endtime']==''}
                    无
                {else}
                    {$item['f_zhiding_endtime']}
                {/if}
            </td>
            <td>
                {if $item['f_typs']=="待审核"}
                    <a class="btn btn-default btn-sm" style="color: red" href="{php echo $this->createWeburl('jianzhi_info', array('f_id' => $item['f_id'], 'op' =>'save'))}" >待审核</a>
                {else}
                    <a class="btn btn-default btn-sm" style="color: green" >审核通过</a>
                {/if}
            </td>
            <td class="text-right">
                {if $item['f_openid']==''}
                    <a class="btn btn-default btn-sm" href="{php echo $this->createWeburl('jianzhi_info', array('f_id' => $item['f_id'], 'op' =>'posts'))}" >编辑</a>
                {else}
                    <a class="btn btn-default btn-sm" href="{php echo $this->createWeburl('jianzhi_info', array('f_id' => $item['f_id'], 'op' =>'post'))}" >查看</a>
                {/if}
                <a class="btn btn-default btn-sm" onclick="return confirm('此操作不可恢复，确认吗？'); return false;" href="{php echo $this->createWeburl('jianzhi_info', array('f_id' => $item['f_id'], 'op' => 'delete'))}">删除</a>
            </td>
        </tr>
        {/loop}
    </table>
</form>
{$pager}
{/if}
{if $op == 'post'}
<form class="form-horizontal" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">兼职信息</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >发布者公司</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="s_name" name="s_name" value="{$items['s_name']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">发布者公司</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职名称</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_name" name="f_name" value="{$items['f_name']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职名称</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职待遇</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_daiyu" name="f_daiyu" value="{$items['f_daiyu']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职待遇</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职类型</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_leixing" name="f_leixing" value="{$items['f_leixing']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职类型</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职招聘人数</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_renshu" name="f_renshu" value="{$items['f_renshu']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职招聘人数</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职招聘性别要求</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <!-- <input type="text" id="f_sex" name="f_sex" value="{$items['f_sex']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off"> -->
                    <select name="f_sex" id="f_sex" class="form-control">
                        <option value="">--请选择--</option>
                        <option value="男"  {if $items['f_sex']=="男"}selected="selected"{/if}>男</option>
                        <option value="女"  {if $items['f_sex']=="女"}selected="selected"{/if}>女</option>
                        <option value="不限" {if $items['f_sex']=="不限"}selected="selected"{/if}>不限</option>
                    </select>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职招聘性别要求</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职负责人</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_fuze" name="f_fuze" value="{$items['f_fuze']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职负责人</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职联系电话</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_fuzetel" name="f_fuzetel" value="{$items['f_fuzetel']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职联系电话</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作内容</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <textarea rows="6" cols="20" name="f_content" id="f_content" class="form-control ng-pristine ng-untouched ng-valid ng-empty">{$items['f_content']}</textarea>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作内容</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作时间</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="fuwu_name" name="title" value="{$items['f_gztime1']}-{$items['f_gztime2']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作时间</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作日期</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="fuwu_name" name="title" value="{$items['f_gzdate1']}-{$items['f_gzdate1']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作日期</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作地址</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="fuwu_name" name="title" value="{$items['f_address']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作地址</div>
            </div>
        </div>
    </div>
</form>
{/if}
{if $op == 'posts'}
<form class="form-horizontal" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">兼职信息</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >发布者公司</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_gongsi" name="f_gongsi" value="{$items['f_gongsi']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">发布者公司</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职名称</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_name" name="f_name" value="{$items['f_name']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职名称</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职待遇</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_daiyu" name="f_daiyu" value="{$items['f_daiyu']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职待遇</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职类型</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <select name="f_leixing" id="f_leixing" class="form-control">
                        <option value="">--请选择--</option>
                        {loop $leixing $l}
                        <option value="{$l['title']}" {if $items['f_leixing']==$l['title']}selected="selected"{/if}>{$l['title']}</option>
                        {/loop}
                    </select>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职类型</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职招聘人数</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_renshu" name="f_renshu" value="{$items['f_renshu']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职招聘人数</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职招聘性别要求</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <select name="f_sex" id="f_sex" class="form-control">
                        <option value="">--请选择--</option>
                        <option value="男"  {if $items['f_sex']=="男"}selected="selected"{/if}>男</option>
                        <option value="女"  {if $items['f_sex']=="女"}selected="selected"{/if}>女</option>
                        <option value="不限" {if $items['f_sex']=="不限"}selected="selected"{/if}>不限</option>
                    </select>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职招聘性别要求</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职负责人</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_fuze" name="f_fuze" value="{$items['f_fuze']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职负责人</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职联系电话</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_fuzetel" name="f_fuzetel" value="{$items['f_fuzetel']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职联系电话</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作内容</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <textarea rows="6" cols="20" name="f_content" id="f_content" class="form-control ng-pristine ng-untouched ng-valid ng-empty">{$items['f_content']}</textarea>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作内容</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作开始时间</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_gztime1" name="f_gztime1" value="{$items['f_gztime1']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                    <!-- {php echo tpl_form_field_date('thumb', $items['thumb'])} -->
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作开始时间[例如00:00]</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作结束时间</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <input type="text" id="f_gztime2" name="f_gztime2" value="{$items['f_gztime2']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作结束时间[例如 24:00]</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作开始日期</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <!-- <input type="text" id="f_gzdate1" name="f_gzdate1" value="{$items['f_gzdate1']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off"> -->
                    {php echo tpl_form_field_date('f_gzdate1', $items['f_gzdate1'])}
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作开始日期</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" >兼职工作结束日期</label>
                 <div class="form-controls col-sm-5" style="margin-left: 45px;">
                    <!-- <input type="text" id="f_gzdate2" name="f_gzdate2" value="{$items['f_gzdate2']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off"> -->
                    {php echo tpl_form_field_date('f_gzdate2', $items['f_gzdate2'])}
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-2 help-block">兼职工作结束日期</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">兼职工作地址</label>
                <div class="form-controls col-sm-5">
                    <input type="text" name="f_address" id="f_address" value="{$items['f_address']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-3 help-block">兼职工作地址</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">兼职工作地址经纬度 <span style="color: #c00">误填反</span></label>
                <div class="form-controls col-sm-2">
                    <input type="text" name="f_lat" id="f_lat" value="{$items['f_lat']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="form-controls col-sm-2 help-block" style="padding-left: 15px">纬度:30.88888</div>
                <div class="form-controls col-sm-2">
                    <input type="text" name="f_lon" id="f_lon" value="{$items['f_lon']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="form-controls col-sm-3 help-block" style="padding-left: 15px">经度:120.6666 <a href="http://lbs.qq.com/tool/getpoint/" target="_blank" style="color:#428BCA"> 经纬度查询</a></div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-12">
            <input name="token" type="hidden" value="{$_W['token']}" />
            <input type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交" style="margin-left: 45%;" />
        </div>
    </div>
</form>
{/if}
